1. Summary of the Invention
The present invention is directed toward a system and method for generating source code in target languages using an object oriented code generator. More particularly, the present invention is directed to a system and method in which input fourth generation language design code is modified into an object oriented design, which is then mapped against source code templates for a target language and processed by a generator algorithm to produce source code files in the target language.
2. Description of the Related Art
A commonly held notion in present day computer technology is that developments in computer software are lagging far behind developments in computer hardware. In part, this is certainly due to the relatively large number of computer languages, the wide range of computer programming skills necessary to develop a single robust and complete computer program, the great divergence in functionality between computer programs used in different industries, and the relative lack of highly skilled computer programmers. It is quite difficult for a single programmer, working in a third generation language (3GL) such as C, Cobol or Fortran, to have the skills necessary to build a robust and complete program, including the required functionality, graphical user interface, etc., which will stand up to the rigors of heavy duty or industrial strength use, or be reliable enough to be employed in critical situations, such as those having banking or military applications.
Given this situation, a number of systems have been developed in recent years which attempt to lower the skill level required to write computer programs, and what are known as fourth generation languages (4GLs) were developed. In fourth generation languages, syntax is simpler and the programmer must specify fewer statements than in 3GLS; thus, the learning curve for new users is lower. However, the trade-off for this relative ease of use is less control of the actual processing carried out by the program written in the 4GL. The code that a programmer writes in a fourth generation language is more concise but more remote from the actual machine instructions carried out by the computer processor than is the code written by a programmer in a third generation language.
Fourth generation languages have been incorporated into a number of tools to simplify the programming process, including what are known as source code generators. Traditional source code generator tools receive user input design, which the user inputs in the fourth generation language, and process this fourth generation language design utilizing a source code generator engine which outputs source code having functionality corresponding to the input design in a specific output language. The output is typically a 3GL (but can be a proprietary language that will be interpreted by a run-time engine during execution).
The generator engine basically maps individual components of the 4GL code design input by the user to corresponding predefined source code snippets in the 3GL. The generator engine performs this mapping function for each basic component of the 4GL design code, and outputs a source file in the desired language.
Such generator systems have a number of drawbacks. For example, traditional systems lack extensibility and are difficult to modify. Quite often, the predefined 3GL snippets are dispersed throughout the generator engine. Making a modification to a 3GL snippet requires detailed knowledge of the generator engine. Similarly, attempting to improve or extend the capabilities of the generator engine by adding 3GL snippets can be quite complex given the problems with finding and addressing the affected generator functionality and locations of affected 3GL code snippets. The resulting generator engine would be more complex and less organized. Further, the code generated by many such systems is often only the shell of the 3GL program which is desired by the user. This is due to the inexactness of the mappings and the inherent limitations found with such systems.
One attempt to overcome some of the problems of traditional source code generators can be found in U.S. Pat. No. 5,159,687, which issued to Richburg on Oct. 27, 1992. The patent describes a number of different knowledgebases which may be used in automatic generation of programming code in different languages. Literature from the assignee of the patent, Caseworks, Inc. of Dunwoody, Ga., describes a product which includes a number of different extensible knowledgebases for use by a code generator in producing the graphical user interface portions of applications in several different 3GL languages. The described product utilizes a proprietary language in order to maintain and extend the various knowledgebases. So, while an attempt has been made to address the problem of extensibility and the lack of modifiability, a new level of complexity has been added by requiring users to learn a proprietary language that has limited application elsewhere, and the basic questions of complexity, completeness and the inherent mapping limitations still apply.
Accordingly, a need exists for an improved code generator which is flexible to maintain and extend and capable of producing complete source code output files in multiple languages.